import request from '@/utils/request'

// 获取水厂下拉列表
export function getFactoryList() {
  return request({
    url: '/dispatch/energy/factoryList',
    method: 'get'
  })
}

// 获取水厂下的站点下拉列表
export function getSiteList(params) {
  return request({
    url: '/dispatch/energy/siteList',
    method: 'get',
    params
  })
}

// 根据站点获取泵组下拉列表
export function getPumpGroupList(siteIds) {
  return request({
    url: `/dispatch/energy/pumpList/${siteIds}`,
    method: 'get',
  })
}

// 总用电量、总电费、千吨次电耗统计
export function getEnergyOverview(params) {
  return request({
    url: '/dispatch/energy/overview',
    method: 'get',
    params
  })
}

// 电量趋势
export function getKwhTrend(params) {
  return request({
    url: '/dispatch/energy/kwh/trend',
    method: 'get',
    params
  })
}

// 电费趋势
export function getCostTrend(params) {
  return request({
    url: '/dispatch/energy/cost/trend',
    method: 'get',
    params
  })
}

// 泵组运行状态
export function getPumpGroupStat(params) {
  return request({
    url: '/dispatch/energy/pumpgroup/stat',
    method: 'get',
    params
  })
}

// 电耗 vs 出口压力 日对比
export function getPowerPressureCompare(params) {
  return request({
    url: '/dispatch/energy/compare/power-pressure',
    method: 'get',
    params
  })
}

// 电耗 vs 出口流量 日对比
export function getPowerFlowCompare(params) {
  return request({
    url: '/dispatch/energy/compare/power-flow',
    method: 'get',
    params
  })
}